# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=lua-cmsgpack
pkgver=0.4.0
pkgrel=0
pkgdesc="MessagePack C implementation for Lua"
url="https://github.com/antirez/lua-cmsgpack"
arch="all"
license="BSD-2-Clause"
makedepends="lua-dev"
source="lua-cmsgpack-$pkgver.tar.gz::https://github.com/antirez/lua-cmsgpack/archive/$pkgver.tar.gz"

build() {
	${CC:-gcc} $CFLAGS -fPIC $(pkg-config --cflags lua) -o cmsgpack.so -shared $LFDLAGS  $(pkg-config --libs lua) lua_cmsgpack.c
}

package() {
	local dir=$( pkg-config --variable INSTALL_CMOD lua)
	install -D cmsgpack.so "$pkgdir"/$dir/cmsgpack.so
}

sha512sums="cf4829ab618d63edd1e630147047b5fe03a276de396c3a8b4ea58d99e9ee980143976f411e42aff63baea31c2315dbf0cdf56c64814074c5333a2243fed0d3cd  lua-cmsgpack-0.4.0.tar.gz"
